#ifndef SETTING_H
#define SETTING_H
#include "QString"
#include "QSettings"
#include <QGlobalStatic>
#include "QVariant"
#include "tlbbcode.h"
#include "QPoint"

#define REGISTER_CODE "registerCode"
#define HELL_CITY "hellCity"
#define XIAOWEI_POINT "xiaoWeiPoint"
#define GROUP_INDEX "groupIndex"
#define RUNSHOP_TOTAL "runshopCount"
#define MAGIC_KEY "magicKey"
#define BLOOD_KEY "bloodKey"
#define QIAN_WEI_YI_RUNSHAOP_GOODS_PRICE "runshopGoodsPrice"
#define GAME_ACCOUNT "gameAccount"
#define GAME_PASSWORD "gamePassword"
#define RUN_SHOP_JSON "runShopJson"
#define ROLE_JSON "roleJson"
#define KUO_ZHANG_JSON "kuoZhangJson"
#define ZHONG_ZHI_JSON "zhongZhiJson"
#define IMG_DISCERN "imgDiscern"
#define SKILL "skill"
#define SKILL2 "skill2"
#define SPEED_FUNC "speedFun"

class Setting
{
public:
    Setting();
     ~Setting();
    static Setting* getInstance();
    //保存注册码
    void setRegisterCode(QString);
    //获取注册码
    QString getRegisterCode();
    //设置复活城市
    void setOutHellCity(QString cityName);
    //获取出低于城市
    QString getOutHellCity();

    //获取加血键
    QString getBloodKey();
    //无冷却技能键
    QString getSkill();

    QString getSkill2();

    //获取加血键
    void setBloodKey(QString key);
    //获取加蓝键
    QString getMagicKey();
    //获取加蓝键
    void setMagicKey(QString key);

    //无冷却技能键
    void setSkill(QString key);

    void setSkill2(QString key);

    void setAccount(QString account);
    QString getAccount();

    void setPassword(QString password);
    QString getPassword();

    void setRunShopJson(QString runShopJson);

    QString getRunShopJson();

    void setRoleBeanJson(QString roleJson);

    QString getRoleBeanJson();

    void setKuoZhangJson(QString roleJson);
    QString getKuoZhangJson();

    void setZhongZhiJson(QString json);
    QString getZhongZhiJson();

    void setImgDiscern(float discern);
    float getImgDiscern();

    QString getSpeed();
    void setSpeed(QString speed);


private:
    QSettings *setting = nullptr;

};

#endif // SETTING_H
